Monadic Second-order Logic
   HOME

TheInfoList



OR:

In
mathematical logic Mathematical logic is the study of logic, formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory. Research in mathematical logic commonly addresses the mathematical properties of for ...
, monadic second-order logic (MSO) is the fragment of
second-order logic In logic and mathematics, second-order logic is an extension of first-order logic, which itself is an extension of propositional logic. Second-order logic is in turn extended by higher-order logic and type theory. First-order logic quantifies onl ...
where the second-order quantification is limited to quantification over sets. It is particularly important in the
logic of graphs In the mathematical fields of graph theory and finite model theory, the logic of graphs deals with formal specifications of graph properties using sentences of mathematical logic. There are several variations in the types of logical operation that ...
, because of
Courcelle's theorem In the study of graph algorithms, Courcelle's theorem is the statement that every graph property definable in the monadic second-order logic of graphs can be decided in linear time on graphs of bounded treewidth. The result was first proved by Bru ...
, which provides algorithms for evaluating monadic second-order formulas over graphs of bounded
treewidth In graph theory, the treewidth of an undirected graph is an integer number which specifies, informally, how far the graph is from being a tree. The smallest treewidth is 1; the graphs with treewidth 1 are exactly the trees and the forests. The gra ...
. It is also of fundamental importance in
automata theory Automata theory is the study of abstract machines and automata, as well as the computational problems that can be solved using them. It is a theory in theoretical computer science. The word ''automata'' comes from the Greek word αὐτόματο ...
, where the Büchi-Elgot-Trakhtenbrot theorem gives a logical characterization of the
regular language In theoretical computer science and formal language theory, a regular language (also called a rational language) is a formal language that can be defined by a regular expression, in the strict sense in theoretical computer science (as opposed to ...
s. Second-order logic allows quantification over
predicates Predicate or predication may refer to: * Predicate (grammar), in linguistics * Predication (philosophy) * several closely related uses in mathematics and formal logic: **Predicate (mathematical logic) **Propositional function **Finitary relation, ...
. However, MSO is the fragment in which second-order quantification is limited to monadic predicates (predicates having a single argument). This is often described as quantification over "sets" because monadic predicates are equivalent in expressive power to sets (the set of elements for which the predicate is true).


Variants

Monadic second-order logic comes in two variants. In the variant considered over structures such as graphs and in Courcelle's theorem, the formula may involve non-monadic predicates (in this case the binary edge predicate E(x, y)), but quantification is restricted to be over monadic predicates only. In the variant considered in automata theory and the Büchi-Elgot-Trakhtenbrot theorem, all predicates, including those in the formula itself, must be monadic, with the exceptions of equality (=) and ordering (<) relations.


Computational complexity of evaluation

Existential monadic second-order logic (EMSO) is the fragment of MSO in which all quantifiers over sets must be
existential quantifier In predicate logic, an existential quantification is a type of quantifier, a logical constant which is interpreted as "there exists", "there is at least one", or "for some". It is usually denoted by the logical operator symbol ∃, which, w ...
s, outside of any other part of the formula. The first-order quantifiers are not restricted. By analogy to
Fagin's theorem Fagin's theorem is the oldest result of descriptive complexity theory, a branch of computational complexity theory that characterizes complexity classes in terms of logic-based descriptions of their problems rather than by the behavior of algorithm ...
, according to which existential (non-monadic) second-order logic captures precisely the
descriptive complexity ''Descriptive Complexity'' is a book in mathematical logic and computational complexity theory by Neil Immerman. It concerns descriptive complexity theory, an area in which the expressibility of mathematical properties using different types of lo ...
of the complexity class NP, the class of problems that may be expressed in existential monadic second-order logic has been called monadic NP. The restriction to monadic logic makes it possible to prove separations in this logic that remain unproven for non-monadic second-order logic. For instance, in the
logic of graphs In the mathematical fields of graph theory and finite model theory, the logic of graphs deals with formal specifications of graph properties using sentences of mathematical logic. There are several variations in the types of logical operation that ...
, testing whether a graph is disconnected belongs to monadic NP, as the test can be represented by a formula that describes the existence of a proper subset of vertices with no edges connecting them to the rest of the graph; however, the complementary problem, testing whether a graph is connected, does not belong to monadic NP. The existence of an analogous pair of complementary problems, only one of which has an existential second-order formula (without the restriction to monadic formulas) is equivalent to the inequality of NP and
coNP In computational complexity theory, co-NP is a complexity class. A decision problem X is a member of co-NP if and only if its complement (complexity), complement is in the complexity class NP (complexity), NP. The class can be defined as follows: ...
, an open question in computational complexity. By contrast, when we wish to check whether a Boolean MSO formula is satisfied by an input finite
tree In botany, a tree is a perennial plant with an elongated stem, or trunk, usually supporting branches and leaves. In some usages, the definition of a tree may be narrower, including only woody plants with secondary growth, plants that are ...
, this problem can be solved in linear time in the tree, by translating the Boolean MSO formula to a
tree automaton A tree automaton is a type of state machine. Tree automata deal with tree structures, rather than the strings of more conventional state machines. The following article deals with branching tree automata, which correspond to regular languages ...
and evaluating the automaton on the tree. In terms of the query, however, the complexity of this process is generally nonelementary. Thanks to
Courcelle's theorem In the study of graph algorithms, Courcelle's theorem is the statement that every graph property definable in the monadic second-order logic of graphs can be decided in linear time on graphs of bounded treewidth. The result was first proved by Bru ...
, we can also evaluate a Boolean MSO formula in linear time on an input graph if the
treewidth In graph theory, the treewidth of an undirected graph is an integer number which specifies, informally, how far the graph is from being a tree. The smallest treewidth is 1; the graphs with treewidth 1 are exactly the trees and the forests. The gra ...
of the graph is bounded by a constant. For MSO formulas that have
free variable In mathematics, and in other disciplines involving formal languages, including mathematical logic and computer science, a free variable is a notation (symbol) that specifies places in an expression where substitution may take place and is not ...
s, when the input data is a tree or has bounded treewidth, there are efficient
enumeration algorithm In computer science, an enumeration algorithm is an algorithm that enumerates the answers to a computational problem. Formally, such an algorithm applies to problems that take an input and produce a list of solutions, similarly to function problem ...
s to produce the set of all solutions, ensuring that the input data is preprocessed in linear time and that each solution is then produced in a delay linear in the size of each solution, i.e., constant-delay in the common case where all free variables of the query are first-order variables (i.e., they do not represent sets). There are also efficient algorithms for counting the number of solutions of the MSO formula in that case.


Decidability and complexity of satisfiability

The satisfiability problem for monadic second-order logic is undecidable in general because this logic subsumes
first-order logic First-order logic—also known as predicate logic, quantificational logic, and first-order predicate calculus—is a collection of formal systems used in mathematics, philosophy, linguistics, and computer science. First-order logic uses quantifie ...
. The monadic second order theory of the infinite complete binary tree, called S2S, is decidable. As a consequence of this result, the following theories are decidable: * The monadic second-order theory of trees. * The monadic second order theory of \mathbb under successor (S1S). * WS2S and WS1S, which restrict quantification to finite subsets (weak monadic second order logic). Note that for binary numbers (represented by subsets), addition is definable even in WS1S. For each of these theories (S2S, S1S, WS2S, WS1S), the complexity of the decision problem is nonelementary.


Use of satisfiability of MSO on trees in verification

Monadic second-order logic of trees has applications in Software verification and, more broadly,
Formal verification In the context of hardware and software systems, formal verification is the act of proving or disproving the correctness of intended algorithms underlying a system with respect to a certain formal specification or property, using formal metho ...
thanks to its decidability and significant expressive power. Decision procedures for satisfiability have been implemented. Such procedures were used to prove properties of programs manipulating linked data structures, as a form of Shape analysis as well as for symbolic reasoning in hardware verification.


See also

*
Descriptive complexity theory Descriptive complexity is a branch of computational complexity theory and of finite model theory that characterizes complexity classes by the type of logic needed to express the languages in them. For example, PH, the union of all complexity clas ...
*
Monadic predicate calculus In logic, the monadic predicate calculus (also called monadic first-order logic) is the fragment of first-order logic in which all relation symbols in the signature are monadic (that is, they take only one argument), and there are no function symbo ...
*
Second-order logic In logic and mathematics, second-order logic is an extension of first-order logic, which itself is an extension of propositional logic. Second-order logic is in turn extended by higher-order logic and type theory. First-order logic quantifies onl ...


References

{{Logic-stub Mathematical logic